package com.ocom.payhandle.dao;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ocom.common.entity.card.EntityXfMerchantInfo;
import com.ocom.common.vo.pay.MachMerchPointInfoVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface IDaoXfMerchantInfo extends BaseMapper<EntityXfMerchantInfo> {


	@Select({"<script>",
			"select d.device_no as machNo,d.device_name as deviceName,d.status,\n" +
					"d.com_id as comId,p.point_id as pointId,p.point_name as pointName," +
					"m.merch_id as merchId,m.merch_name as merchName  \n" +
					"FROM xf_device_info d \n" +
					"LEFT JOIN xf_point_info p ON p.com_id=d.com_id AND p.point_id=d.point_id \n" +
					"LEFT JOIN xf_merchant_info m ON p.merch_id=m.merch_id and p.com_id=m.com_id \n " +
					"where d.com_id=#{comId} and d.device_no = #{machNo} ",
			"</script>"})
	MachMerchPointInfoVo getMerchPointInfo(@Param("comId")Long comId, @Param("machNo") String machNo);


}
